package _250323;

public class Test3 {
	public static void main(String[] args) {
		int[] nums= {3,4,5,1,2};
		int i=findMin(nums);
		System.out.println(i);
	}
	
	public static int findMin(int[] nums) {
	    int left=0;int right=nums.length-1;
	    int k=nums[right];
	    while(left<right){
	        int mid=left+(right-left)/2;
	        if(nums[mid]>k)left=mid+1;
	        else right=mid;
	    }
	    return left;

	}
}


